{% extends "base.html" %}

{% block title %}操作日志 - 网站管理后台{% endblock %}

{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">操作日志</h1>
</div>

<div class="table-responsive">
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>ID</th>
                <th>用户ID</th>
                <th>用户名</th>
                <th>操作</th>
                <th>方法</th>
                <th>URL</th>
                <th>IP</th>
                <th>参数</th>
                <th>结果</th>
                <th>耗时(毫秒)</th>
                <th>创建时间</th>
            </tr>
        </thead>
        <tbody>
            {% for log in logs %}
            <tr>
                <td>{{ log[0] }}</td>
                <td>{{ log[1] }}</td>
                <td>{{ log[2] }}</td>
                <td>{{ log[3] }}</td>
                <td>{{ log[4] }}</td>
                <td>{{ log[5] }}</td>
                <td>{{ log[6] }}</td>
                <td>{{ log[8] or '-' }}</td>
                <td>{{ log[9] or '-' }}</td>
                <td>{{ log[10] or '-' }}</td>
                <td>{{ log[11] }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}